package com.appkubes.mall.restful.application.activity.goods.controller;

import com.appkubes.cloud.config.params.paramValid.ParamValid;
import com.appkubes.common.Response;
import com.appkubes.mall.core.controller.BaseMallActivityGoodsController;
import com.appkubes.mall.restful.application.activity.goods.entity.dto.DdqListDTO;
import com.appkubes.mall.restful.application.activity.goods.entity.vo.DdqListVO;
import com.appkubes.mall.restful.application.activity.goods.service.ActivityGoodsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Lin Jiaming
 * @Date: 2020/3/7 11:12
 * @Description:
 */
@Api(tags = "活动商品")
@RequestMapping("/activity/goods")
@RestController
public class ActivityGoodsController extends BaseMallActivityGoodsController {

    @Autowired
    ActivityGoodsService activityGoodsService;

    @ApiOperation("叮咚抢商品列表")
    @GetMapping("/ddpList")
    public Response ddpList(@ParamValid DdqListVO ddqListVO){
        List<DdqListDTO> goodsList = activityGoodsService.ddqList(ddqListVO);
        return Response.success(goodsList);
    }
}
